package controller;
import java.awt.dnd.DnDConstants;
import java.awt.dnd.DragGestureListener;
import java.awt.dnd.DragSource;
import java.awt.dnd.DragSourceListener;
import java.awt.dnd.DropTargetListener;
import java.awt.event.MouseListener;
import javax.swing.*;
import javax.swing.border.BevelBorder;
import javax.swing.border.Border;

/**
 * 
 */

/**
 * @author Leo COLLET, Nelle VAROQUAUX
 *
 */
public abstract class DragNDroppable extends JComponent implements DragGestureListener, DragSourceListener, DropTargetListener, MouseListener {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	DragSource dragSource;
	
	protected static final Border normalBorder = new BevelBorder(BevelBorder.LOWERED);
	protected static final Border dropBorder = new BevelBorder(BevelBorder.RAISED);
	
	public DragNDroppable(){
		addMouseListener(this);
		dragSource = DragSource.getDefaultDragSource();
		dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY_OR_MOVE, this);
	}

}
